/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package arkin.util;

import arkin.AND;
import arkin.Action;
import arkin.ActionDifferentialWheel;
import arkin.ActionLED;
import arkin.ActionPen;
import arkin.Actuator;
import arkin.Arbiter;
import arkin.ArkinPackage;
import arkin.Behavior;
import arkin.Binary;
import arkin.Color;
import arkin.Constante;
import arkin.DifferentialWheel;
import arkin.DistanceSensor;
import arkin.EQUAL;
import arkin.EntryState;
import arkin.Expression;
import arkin.FSM;
import arkin.GT;
import arkin.GTE;
import arkin.IVisitable;
import arkin.IVisitor;
import arkin.LED;
import arkin.LT;
import arkin.LTE;
import arkin.LightSensor;
import arkin.NOT;
import arkin.OR;
import arkin.Pen;
import arkin.Robot;
import arkin.Sensor;
import arkin.State;
import arkin.TouchSensor;
import arkin.Transition;
import arkin.Unary;
import arkin.XOR;
import arkin.*;

import java.util.Map;

import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.ResourceLocator;

import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.util.EObjectValidator;

/**
 * <!-- begin-user-doc -->
 * The <b>Validator</b> for the model.
 * <!-- end-user-doc -->
 * @see arkin.ArkinPackage
 * @generated
 */
public class ArkinValidator extends EObjectValidator {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final ArkinValidator INSTANCE = new ArkinValidator();

	/**
	 * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see org.eclipse.emf.common.util.Diagnostic#getSource()
	 * @see org.eclipse.emf.common.util.Diagnostic#getCode()
	 * @generated
	 */
	public static final String DIAGNOSTIC_SOURCE = "arkin";

	/**
	 * A constant with a fixed name that can be used as the base value for additional hand written constants.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;

	/**
	 * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ArkinValidator() {
		super();
	}

	/**
	 * Returns the package of this validator switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EPackage getEPackage() {
	  return ArkinPackage.eINSTANCE;
	}

	/**
	 * Calls <code>validateXXX</code> for the corresponding classifier of the model.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
		switch (classifierID) {
			case ArkinPackage.ROBOT:
				return validateRobot((Robot)value, diagnostics, context);
			case ArkinPackage.BEHAVIOR:
				return validateBehavior((Behavior)value, diagnostics, context);
			case ArkinPackage.SENSOR:
				return validateSensor((Sensor)value, diagnostics, context);
			case ArkinPackage.ACTUATOR:
				return validateActuator((Actuator)value, diagnostics, context);
			case ArkinPackage.DISTANCE_SENSOR:
				return validateDistanceSensor((DistanceSensor)value, diagnostics, context);
			case ArkinPackage.LIGHT_SENSOR:
				return validateLightSensor((LightSensor)value, diagnostics, context);
			case ArkinPackage.ARBITER:
				return validateArbiter((Arbiter)value, diagnostics, context);
			case ArkinPackage.ACTION:
				return validateAction((Action)value, diagnostics, context);
			case ArkinPackage.TRANSITION:
				return validateTransition((Transition)value, diagnostics, context);
			case ArkinPackage.STATE:
				return validateState((State)value, diagnostics, context);
			case ArkinPackage.FSM:
				return validateFSM((FSM)value, diagnostics, context);
			case ArkinPackage.DIFFERENTIAL_WHEEL:
				return validateDifferentialWheel((DifferentialWheel)value, diagnostics, context);
			case ArkinPackage.LED:
				return validateLED((LED)value, diagnostics, context);
			case ArkinPackage.ACTION_LED:
				return validateActionLED((ActionLED)value, diagnostics, context);
			case ArkinPackage.ACTION_DIFFERENTIAL_WHEEL:
				return validateActionDifferentialWheel((ActionDifferentialWheel)value, diagnostics, context);
			case ArkinPackage.EXPRESSION:
				return validateExpression((Expression)value, diagnostics, context);
			case ArkinPackage.UNARY:
				return validateUnary((Unary)value, diagnostics, context);
			case ArkinPackage.BINARY:
				return validateBinary((Binary)value, diagnostics, context);
			case ArkinPackage.NOT:
				return validateNOT((NOT)value, diagnostics, context);
			case ArkinPackage.AND:
				return validateAND((AND)value, diagnostics, context);
			case ArkinPackage.OR:
				return validateOR((OR)value, diagnostics, context);
			case ArkinPackage.XOR:
				return validateXOR((XOR)value, diagnostics, context);
			case ArkinPackage.LT:
				return validateLT((LT)value, diagnostics, context);
			case ArkinPackage.GT:
				return validateGT((GT)value, diagnostics, context);
			case ArkinPackage.EQUAL:
				return validateEQUAL((EQUAL)value, diagnostics, context);
			case ArkinPackage.LTE:
				return validateLTE((LTE)value, diagnostics, context);
			case ArkinPackage.GTE:
				return validateGTE((GTE)value, diagnostics, context);
			case ArkinPackage.CONSTANTE:
				return validateConstante((Constante)value, diagnostics, context);
			case ArkinPackage.ENTRY_STATE:
				return validateEntryState((EntryState)value, diagnostics, context);
			case ArkinPackage.IVISITABLE:
				return validateIVisitable((IVisitable)value, diagnostics, context);
			case ArkinPackage.IVISITOR:
				return validateIVisitor((IVisitor)value, diagnostics, context);
			case ArkinPackage.BOOLEAN:
				return validateBoolean((arkin.Boolean)value, diagnostics, context);
			case ArkinPackage.TOUCH_SENSOR:
				return validateTouchSensor((TouchSensor)value, diagnostics, context);
			case ArkinPackage.PEN:
				return validatePen((Pen)value, diagnostics, context);
			case ArkinPackage.ACTION_PEN:
				return validateActionPen((ActionPen)value, diagnostics, context);
			case ArkinPackage.COLOR:
				return validateColor((Color)value, diagnostics, context);
			default:
				return true;
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateRobot(Robot robot, DiagnosticChain diagnostics, Map<Object, Object> context) {
		if (!validate_NoCircularContainment(robot, diagnostics, context)) return false;
		boolean result = validate_EveryMultiplicityConforms(robot, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(robot, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(robot, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(robot, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(robot, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(robot, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(robot, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(robot, diagnostics, context);
		if (result || diagnostics != null) result &= validateRobot_behaviorsInTheSameRobot(robot, diagnostics, context);
		if (result || diagnostics != null) result &= validateRobot_actuatorsName(robot, diagnostics, context);
		return result;
	}

	/**
	 * The cached validation expression for the behaviorsInTheSameRobot constraint of '<em>Robot</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static final String ROBOT__BEHAVIORS_IN_THE_SAME_ROBOT__EEXPRESSION = "arbiter.behaviors->forAll(c : Behavior | behaviors->includes(c))";

	/**
	 * Validates the behaviorsInTheSameRobot constraint of '<em>Robot</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateRobot_behaviorsInTheSameRobot(Robot robot, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return
			validate
				(ArkinPackage.Literals.ROBOT,
				 robot,
				 diagnostics,
				 context,
				 "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
				 "behaviorsInTheSameRobot",
				 ROBOT__BEHAVIORS_IN_THE_SAME_ROBOT__EEXPRESSION,
				 Diagnostic.ERROR,
				 DIAGNOSTIC_SOURCE,
				 0);
	}

	/**
	 * The cached validation expression for the actuatorsName constraint of '<em>Robot</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static final String ROBOT__ACTUATORS_NAME__EEXPRESSION = "actuators->isUnique(name)";

	/**
	 * Validates the actuatorsName constraint of '<em>Robot</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateRobot_actuatorsName(Robot robot, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return
			validate
				(ArkinPackage.Literals.ROBOT,
				 robot,
				 diagnostics,
				 context,
				 "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
				 "actuatorsName",
				 ROBOT__ACTUATORS_NAME__EEXPRESSION,
				 Diagnostic.ERROR,
				 DIAGNOSTIC_SOURCE,
				 0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateBehavior(Behavior behavior, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(behavior, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateSensor(Sensor sensor, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(sensor, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateActuator(Actuator actuator, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(actuator, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateDistanceSensor(DistanceSensor distanceSensor, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(distanceSensor, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateLightSensor(LightSensor lightSensor, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(lightSensor, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateArbiter(Arbiter arbiter, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(arbiter, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateAction(Action action, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(action, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateTransition(Transition transition, DiagnosticChain diagnostics, Map<Object, Object> context) {
		if (!validate_NoCircularContainment(transition, diagnostics, context)) return false;
		boolean result = validate_EveryMultiplicityConforms(transition, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(transition, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(transition, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(transition, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(transition, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(transition, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(transition, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(transition, diagnostics, context);
		if (result || diagnostics != null) result &= validateTransition_NeverConstante(transition, diagnostics, context);
		return result;
	}

	/**
	 * The cached validation expression for the NeverConstante constraint of '<em>Transition</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static final String TRANSITION__NEVER_CONSTANTE__EEXPRESSION = "condition.oclAsSet()->oclIsTypeOf(Constante) = false";

	/**
	 * Validates the NeverConstante constraint of '<em>Transition</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateTransition_NeverConstante(Transition transition, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return
			validate
				(ArkinPackage.Literals.TRANSITION,
				 transition,
				 diagnostics,
				 context,
				 "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
				 "NeverConstante",
				 TRANSITION__NEVER_CONSTANTE__EEXPRESSION,
				 Diagnostic.ERROR,
				 DIAGNOSTIC_SOURCE,
				 0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateState(State state, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(state, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFSM(FSM fsm, DiagnosticChain diagnostics, Map<Object, Object> context) {
		if (!validate_NoCircularContainment(fsm, diagnostics, context)) return false;
		boolean result = validate_EveryMultiplicityConforms(fsm, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(fsm, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(fsm, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(fsm, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(fsm, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(fsm, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(fsm, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(fsm, diagnostics, context);
		if (result || diagnostics != null) result &= validateFSM_oneUniqueEntryState(fsm, diagnostics, context);
		return result;
	}

	/**
	 * The cached validation expression for the oneUniqueEntryState constraint of '<em>FSM</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static final String FSM__ONE_UNIQUE_ENTRY_STATE__EEXPRESSION = "states->select(oclIsTypeOf(EntryState))->size() = 1";

	/**
	 * Validates the oneUniqueEntryState constraint of '<em>FSM</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateFSM_oneUniqueEntryState(FSM fsm, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return
			validate
				(ArkinPackage.Literals.FSM,
				 fsm,
				 diagnostics,
				 context,
				 "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
				 "oneUniqueEntryState",
				 FSM__ONE_UNIQUE_ENTRY_STATE__EEXPRESSION,
				 Diagnostic.ERROR,
				 DIAGNOSTIC_SOURCE,
				 0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateDifferentialWheel(DifferentialWheel differentialWheel, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(differentialWheel, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateLED(LED led, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(led, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateActionLED(ActionLED actionLED, DiagnosticChain diagnostics, Map<Object, Object> context) {
		if (!validate_NoCircularContainment(actionLED, diagnostics, context)) return false;
		boolean result = validate_EveryMultiplicityConforms(actionLED, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(actionLED, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(actionLED, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(actionLED, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(actionLED, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(actionLED, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(actionLED, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(actionLED, diagnostics, context);
		if (result || diagnostics != null) result &= validateActionLED_isOnLED(actionLED, diagnostics, context);
		return result;
	}

	/**
	 * The cached validation expression for the isOnLED constraint of '<em>Action LED</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static final String ACTION_LED__IS_ON_LED__EEXPRESSION = "actuator.oclAsSet()->oclIsTypeOf(LED)";

	/**
	 * Validates the isOnLED constraint of '<em>Action LED</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateActionLED_isOnLED(ActionLED actionLED, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return
			validate
				(ArkinPackage.Literals.ACTION_LED,
				 actionLED,
				 diagnostics,
				 context,
				 "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
				 "isOnLED",
				 ACTION_LED__IS_ON_LED__EEXPRESSION,
				 Diagnostic.ERROR,
				 DIAGNOSTIC_SOURCE,
				 0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateActionDifferentialWheel(ActionDifferentialWheel actionDifferentialWheel, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(actionDifferentialWheel, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateExpression(Expression expression, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(expression, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateUnary(Unary unary, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(unary, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateBinary(Binary binary, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(binary, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateNOT(NOT not, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(not, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateAND(AND and, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(and, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateOR(OR or, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(or, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateXOR(XOR xor, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(xor, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateLT(LT lt, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(lt, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateGT(GT gt, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(gt, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateEQUAL(EQUAL equal, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(equal, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateLTE(LTE lte, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(lte, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateGTE(GTE gte, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(gte, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateConstante(Constante constante, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(constante, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateEntryState(EntryState entryState, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(entryState, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateIVisitable(IVisitable iVisitable, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(iVisitable, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateIVisitor(IVisitor iVisitor, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(iVisitor, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateBoolean(arkin.Boolean boolean_, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(boolean_, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateTouchSensor(TouchSensor touchSensor, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(touchSensor, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validatePen(Pen pen, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(pen, diagnostics, context);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateActionPen(ActionPen actionPen, DiagnosticChain diagnostics, Map<Object, Object> context) {
		if (!validate_NoCircularContainment(actionPen, diagnostics, context)) return false;
		boolean result = validate_EveryMultiplicityConforms(actionPen, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(actionPen, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(actionPen, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(actionPen, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryProxyResolves(actionPen, diagnostics, context);
		if (result || diagnostics != null) result &= validate_UniqueID(actionPen, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryKeyUnique(actionPen, diagnostics, context);
		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(actionPen, diagnostics, context);
		if (result || diagnostics != null) result &= validateActionPen_isOnPen(actionPen, diagnostics, context);
		return result;
	}

	/**
	 * The cached validation expression for the isOnPen constraint of '<em>Action Pen</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static final String ACTION_PEN__IS_ON_PEN__EEXPRESSION = "actuator.oclAsSet()->oclIsTypeOf(Pen)";

	/**
	 * Validates the isOnPen constraint of '<em>Action Pen</em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateActionPen_isOnPen(ActionPen actionPen, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return
			validate
				(ArkinPackage.Literals.ACTION_PEN,
				 actionPen,
				 diagnostics,
				 context,
				 "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
				 "isOnPen",
				 ACTION_PEN__IS_ON_PEN__EEXPRESSION,
				 Diagnostic.ERROR,
				 DIAGNOSTIC_SOURCE,
				 0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean validateColor(Color color, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}

	/**
	 * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public ResourceLocator getResourceLocator() {
		// TODO
		// Specialize this to return a resource locator for messages specific to this validator.
		// Ensure that you remove @generated or mark it @generated NOT
		return super.getResourceLocator();
	}

} //ArkinValidator
